#ifndef MYLIST_H
#define MYLIST_H

#include <QWidget>
#include <QListWidget>

class MyList:public QListWidget
{
    Q_OBJECT
public:
    MyList(QWidget *parent = 0);

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void dragEnterEvent(QDragEnterEvent *event);
    void dragMoveEvent(QDragMoveEvent *event);
    void dropEvent(QDropEvent *event);
private:
    void performDrag();
    QPoint startPos;
};

#endif // MYLIST_H
